// 表单字段类型定义
const FormDataType = [
    "number",    // id
    "string",    // driverId
    "number",    // totalAmount
    "number",    // lockAmount
    "number",    // availableAmount
    "number",    // totalIncomeAmount
    "number",    // totalPayAmount
    "dateTime",    // createTime
    "dateTime",    // updateTime
    "boolean"     // isDeleted
];

// 表单默认数据
const FormData = {
    id: null,
    driverId: "",
    totalAmount: null,
    lockAmount: null,
    availableAmount: null,
    totalIncomeAmount: null,
    totalPayAmount: null,
    createTime: "",
    updateTime: "",
    isDeleted: null
};

// 字段标签
const labels = {
    id: "编号",
    driverId: "司机id",
    totalAmount: "账户总金额",
    lockAmount: "锁定金额",
    availableAmount: "可用金额",
    totalIncomeAmount: "总收入",
    totalPayAmount: "总支出",
    createTime: "创建时间",
    updateTime: "修改时间",
    isDeleted: "是否删除"
};

// 选项配置
const options = {
    isDeleted: [
        { value: 1, label: "已删除" },
        { value: 0, label: "未删除" }
    ]
};

// 表格列配置
const tableColumns = [
    { prop: "id", label: "编号", sortable: true, align: "center" },
    { prop: "driverId", label: "司机id", align: "center" },
    { prop: "totalAmount", label: "账户总金额", align: "center" },
    { prop: "lockAmount", label: "锁定金额", align: "center" },
    { prop: "availableAmount", label: "可用金额", align: "center" },
    { prop: "totalIncomeAmount", label: "总收入", align: "center" },
    { prop: "totalPayAmount", label: "总支出", align: "center" },
    { prop: "createTime", label: "创建时间", sortable: true, align: "center" },
    { prop: "updateTime", label: "修改时间", sortable: true, align: "center" },
    {
        prop: "isDeleted",
        label: "是否删除",
        align: "center",
        formatter: (row) => row.isDeleted === 1 ? "已删除" : "未删除"
    }
];

// 统一导出配置
export const DriverAccountTableConfig = {
    FormData,
    FormDataType,
    labels,
    options,
    tableColumns
};

export default DriverAccountTableConfig;